﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;


namespace ISFProject.Models
{
    public class SchoolCupCoordinator
    {
        [Key]
        public int SchoolCupCoordinatorId { get; set; }

        [Required(ErrorMessage = "Please enter your first name")]
        [StringLength(45, MinimumLength = 3, ErrorMessage = "Invalid field length")]
        [Display(Name = "First name*")]
        public string FirstName { get; set; }

        [Required(ErrorMessage = "Please enter your last name")]
        [StringLength(45, MinimumLength = 3, ErrorMessage = "Invalid field length")]
        [Display(Name = "Last name*")]
        public string LastName { get; set; }

        [Required(ErrorMessage = "Please enter your email address")]
        [RegularExpression(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessage = "Please enter a valid email address")]
        [Display(Name = "Email of representative*")]
        public String Mail { get; set; }

        [Required(ErrorMessage = "School role is missing")]
        [StringLength(45, MinimumLength = 1, ErrorMessage = "Invalid fieldlength")]
        public string SchoolRole { get; set; }

        public int SchoolId { get; set; }
        public virtual School School { get; set; }
       
    }
}